<?php if (!defined('BASEPATH')) exit('Sorry, error.. :]');

class Root extends Controller {

    function __construct()
	{
		parent::Controller();
		
		$this->load->helper('url');
		$this->load->library('frontview');
		$this->load->model(array('PhotoModel', 'CategoryModel'));

		$this->smartylib->debugging = true;
	}

	function index()
	{
		$this->smartylib->assign('category', $this->CategoryModel->getTree());
		$this->smartylib->assign('page', $this->frontview->view());
		$this->smartylib->display('layout.tpl');
	
	}

}